<template>

  <div>
    <!-- <input :value="value" @input="$emit('input', $event.target.value)"> -->
    <!-- 日期选择器不能使用@change,不会触发事件, 应该采用@input 进程触发 -->
    <el-date-picker
      :value="value"
      type="date"
      value-format="yyyy-MM-dd"
      placeholder="选择日期"
      @input="onChange($event)"
    />

  </div>
</template>

<script>

export default {
  name: 'BaseDateRange',

  props: {
    value: {
      type: String,
      default: () => { return '' }
    }
  },

  data() {
    return {

    }
  },
  watch: {

  },
  created() {

  },
  mounted() {

  },
  methods: {
    onChange(val) {
      this.$emit('input', val)
    }

  }
}
</script>

<style lang="scss" scoped>

</style>
